package com.zxw.springtest.login.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zxw.springtest.login.dao.LoginDao;
import com.zxw.springtest.login.domin.LoginVO;
import com.zxw.springtest.login.service.LoginService;

@Component
public class LoginImpl implements LoginService{
	@Autowired
	private LoginDao dao;

	public Boolean login(String username, String password) {
		System.out.println("111111111111111111111111111");
		int i = dao.login(username,password);
		if(i>0){
			return true;
		}else{
			return false;
		}	
	}
	
	@Override
	public LoginVO getUserInfoByUsername(String userName) throws Exception{
		// TODO Auto-generated method stub
		return dao.getUserInfoByUsername(userName);
	}

}
